package com.xing.order.service;

import com.xing.order.entity.OrderInfo;
import com.xing.order.entity.PaymentInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <p>
 * 支付信息表 服务类
 * </p>
 *
 * @author xingfuao
 * @since 2022-08-08
 */
public interface PaymentInfoService extends IService<PaymentInfo> {

    //向支付记录表添加信息
    void savePaymentInfo(OrderInfo order, Integer paymentType);

    //更新订单状态
    void paySuccess(String out_trade_no, Map<String, String> resultMap);

    /**
     * 获取支付记录
     *
     * @param orderId
     * @param status
     * @return
     */
    PaymentInfo getPaymentInfo(Long orderId, Integer status);
}
